<include file="Public/inc/header.html" />
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">系统用户列表</h3>
                        <!--搜索工具栏
                           -<div class="box-tools">
                           -    <div class="input-group" style="width: 150px;">
                           -        <input type="text" name="table_search" class="form-control input-sm pull-right" placeholder="Search">
                           -        <div class="input-group-btn">
                           -            <button class="btn btn-sm btn-default"><i class="fa fa-search"></i></button>
                           -        </div>
                           -    </div>
                           -</div>
                           -->
                    </div><!-- /.box-header -->
                    <div class="box-body table-responsive no-padding">
                        <table class="table table-hover">
                            <tr>
                                <th>用户名</th>
                                <th>创建时间</th>
                                <th>操作</th>
                            </tr>
                            <foreach name='data.data' item='vo'>
                                <tr>
                                    <td>{$vo['username']}</td>
                                    <td>{$vo['ctime']|date='Y-m-d H:i:s',###}</td>
                                    <td>
                                        <button type="button" data-id="{$vo['id']}" class="btn btn-danger delete" data-toggle="modal" data-target="#myModal">删除</button>　
                                        <!-- <a href="/drm/index.php/Home/User/Index/userEdit.html?id={$vo['id']}"><button type="button" class="btn btn-warning">修改密码</button></a> -->
                                        <a href="/drm/index.php/Home/User/Index/userRecover.html"><button type="button" class="btn btn-warning">修改密码</button></a>
                                    </td>
                                </tr>
                            </foreach>
                        </table>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div>
        </div>
    </section>
    <include file="Public/inc/footer.html" />
        <script>

            $('.delete').click(function(){
                var id = $(this).data('id');

                $('#yes').click(function(){
                    $.post('/drm/index.php/Home/User/Index/userDelete.html',{'id':id},function(){
                        window.location.reload();
                    })
                })
            })
        </script>
